<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page isELIgnored="false"%>
<html>
<head>
    <title>按件计算结果比对</title>
    <style>
        .table-responsive{
            overflow: auto; width: 100%;
        }
        .table {
            white-space: nowrap;
            overflow:scroll;
            width: inherit;
        }
        .table td {
            white-space: nowrap;
            text-overflow: ellipsis;
        }
    </style>
</head>
<body>
    <div ng-app="myApp" ng-controller="PieceResultCtrl">
        <div class="row">
            <ui-container url="report/calculate/list/piece" key="majorRuleLog-list-00">
                <ui-search-form>
                    <search-select-remote url="report/calculate/suffixs" class="col-md-3"  name="suffix" value-name="suffix" text-name="suffix" isslectfirst=true >
                    </search-select-remote>
                    <search-select class="col-md-3" name="resultType" value="dangdang_result">
                        <option value="dangdang_result">当当</option>
                        <option value="normal_result">非当当</option>
                    </search-select>
                    <search-select-remote placeholder="请选择供应商" url="system/supplier/listall" class="col-md-3" name="supplierName" value-name="name" text-name="name" isslectfirst=true>
                    </search-select-remote>
                    <search-select-remote placeholder="请选择承运商" url="system/carrier/carriers" class="col-md-3" name="carrierName" value-name="carrierName" text-name="carrierName" >
                    </search-select-remote>
                    <search-select-remote placeholder="请选择目的省" url="regioncode/province" class="col-md-3" name="toProvinceName" value-name="code" text-name="name">
                    </search-select-remote>
                    <search-input class="col-md-3" name="orgName" placeholder="请输入站点名称"></search-input>
                    <search-input class="col-md-3" name="workNo" placeholder="请输入员工工号"></search-input>
                    <search-input class="col-md-3" name="realName" placeholder="请输入员工姓名"></search-input>
                </ui-search-form>
                <ui-table-tool> </ui-table-tool>
                <ui-table dischecked=true>
                </ui-table>
                <table-page/>
            </ui-container>
        </div>
    </div>
<script>
    angular.module('myApp',['ui.table']);
    angular.module('myApp').controller('PieceResultCtrl', function($scope){
        $scope._columns=[
            {name:'waybillNum',head:'运单号'},
            {name:'businessCode',head:'订单号'},
            {name:'postmanNo',head:'配送员id'},
            {name:'workNo',head:'配送员工号'},
            {name:'realName',head:'配送员姓名'},
            {name:'orgName',head:'配送站点'},
            {name:'supplierName',head:'供应商'},
            {name:'carrierName',head:'承运商'},
            {name:'supplierWarehouse',head:'发货仓库',render(data,value){
                return value == null ? '': value;
            }},
            {name:'fromProvinceName',head:'发货省',render(data,value){
                return value == null ? '': value;
            }},
            {name:'fromCityName',head:'发货城市',render(data,value){
                return value == null ? '': value;
            }},
            {name:'toCountyName',head:'发货区县',render(data,value){
                return value == null ? '': value;
            }},
            {name:'toProvinceName',head:'目的省份',render(data,value){
                return value == null ? '': value;
            }},
            {name:'toCityName',head:'目的城市',render(data,value){
                return value == null ? '': value;
            }},
            {name:'toCountyName',head:'目的区县',render(data,value){
                return value == null ? '': value;
            }},
            {name:'major',head:'首拖件',render(data,value){
                return value == 0 ?'首件':'拖件' ;
            }},
            {name:'cod',head:'代收款',render(data,value){
                return value == null?'': value;
            }},
            {name:'acceptTime',head:'揽收时间',render(data,value){
                return value == null ? '': new Date(value).format("yyyy-MM-dd hh:mm:ss");
            }},
            {name:'signTime',head:'签收时间',render(data,value){
                return value == null ? '': new Date(value).format("yyyy-MM-dd hh:mm:ss");
            }},
            {name:'settlementType',head:'结算类型',render(data,value){
                switch (value + ""){
                    case "0" : return "投递员价";
                    case "1" : return "合作价";
                    case "2" : return "合作站点价";
                    default : return "";
                }
            }},
            {name:'ruleFlag',head:'计算规则',render(data,value){
                return value == 0 ? '按件': '按重';
            }},
            {name:'fee',head:'费用',render(data,value){
                return value == null ? '': value;
            }},
            {name:'numeration',head:'计算公式'},
            {name:'firstPrice',head:'首件价'},
            {name:'secondPrice',head:'拖件价'},
            {name:'weight',head:'重量'},
            {name:'direction',head:'上门退换标识',render(data,value){
                switch (value + ""){
                    case "1" : return "上门退";
                    case "2" : return "上门换";
                    default : return "";
                }
            }},
            {name:'temperature',head:'冷链标识',render(data,value){
                switch (value + ""){
                    case "1" : return "冷链";
                    default : return "";
                }
            }},
            {name:'expressScheduleType',head:'当日达标识',render(data,value){
                switch (value + ""){
                    case "1" : return "当日达";
                    default : return "";
                }
            }}
        ];
    });

</script>
</body>
</html>
